FILE(GLOB_RECURSE VORTEX_TRT_CUDA_SOURCES "src/*.cu")
FILE(GLOB_RECURSE VORTEX_TRT_CPP_SOURCES "src/*.cpp")
FILE(GLOB_RECURSE VORTEX_TRT_HEADERS "src/*.h")

cuda_add_library(
    vortex-trt STATIC 
    ${VORTEX_TRT_CUDA_SOURCES}
    ${VORTEX_TRT_CPP_SOURCES}
    ${VORTEX_TRT_HEADERS}
)

# debug
# message(CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR})

target_include_directories(
    vortex-trt PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/src/
)

# link nvonnxparser if use default onnxparser
target_link_libraries(
    vortex-trt PRIVATE
    nvinfer
    nvinfer_plugin
    nvonnxparser
    cudart
    ${OpenCV_LIBS}
)

set_target_properties(vortex-trt PROPERTIES CUDA_ARCHITECTURES "35;50;72")
